Skip to content

Conversation

@cosmicBboy
Copy link
Contributor

@cosmicBboy cosmicBboy commented Jul 16, 2025

This PR optimizes docker image size by giving ownership of the micromamba python installation and virtual environments created during the image build process on the same layer that creates the virtual environment. This avoids layer duplication.

Note: Setting USER flytekit before the python venv installation commands leads to various issues, e.g. poetry package installation doesn't work because the flytekit user doesn't seem to have certain necessary network access while root does.

Summary by Bito

This pull request optimizes the Docker image build process by ensuring that virtual environments and micromamba Python installations are owned by the flytekit user, reducing image size and avoiding layer duplication. Adjustments to the Dockerfile commands address issues with running as a non-root user.

@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.42%. Comparing base (001e3ab) to head (2c185bf).
Report is 2 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (001e3ab) and HEAD (2c185bf). Click for more details.

HEAD has 24 uploads less than BASE
Flag BASE (001e3ab) HEAD (2c185bf)
25 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3299       +/-   ##
===========================================
- Coverage   88.77%   76.42%   -12.36%     
===========================================
  Files         115      215      +100     
  Lines        4866    22548    +17682     
  Branches        0     2969     +2969     
===========================================
+ Hits         4320    17233    +12913     
- Misses        546     4498     +3952     
- Partials        0      817      +817     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cosmicBboy cosmicBboy merged commit eb5a67f into master Jul 16, 2025
228 of 230 checks passed
Atharva1723 pushed a commit to Atharva1723/flytekit that referenced this pull request Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants